package sjtu.rfid.rri.services.casp.model;

import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;

public class ItemError implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 4506697064651735357L;

	private String tagID;

	private List<BizLocationType> history = new LinkedList<BizLocationType>();

	private String currentBizLocation;
	private BizLocationType currentBizLocationType;

	private String expectedBizLocation;
	private BizLocationType expectedBizLocationType;

	/**
	 * @return the tagID
	 */
	public String getTagID() {
		return tagID;
	}

	/**
	 * @param tagID
	 *            the tagID to set
	 */
	public void setTagID(String tagID) {
		this.tagID = tagID;
	}

	/**
	 * @return the history
	 */
	public List<BizLocationType> getHistory() {
		return history;
	}

	/**
	 * @param history
	 *            the history to add
	 */
	public void addHistory(List<BizLocationType> history) {
		this.history.addAll(history);
	}

	/**
	 * @return the currentBizLocation
	 */
	public String getCurrentBizLocation() {
		return currentBizLocation;
	}

	/**
	 * @param currentBizLocation
	 *            the currentBizLocation to set
	 */
	public void setCurrentBizLocation(String currentBizLocation) {
		this.currentBizLocation = currentBizLocation;
	}

	/**
	 * @return the currentBizLocationType
	 */
	public BizLocationType getCurrentBizLocationType() {
		return currentBizLocationType;
	}

	/**
	 * @param currentBizLocationType
	 *            the currentBizLocationType to set
	 */
	public void setCurrentBizLocationType(BizLocationType currentBizLocationType) {
		this.currentBizLocationType = currentBizLocationType;
	}

	/**
	 * @return the expectedBizLocation
	 */
	public String getExpectedBizLocation() {
		return expectedBizLocation;
	}

	/**
	 * @param expectedBizLocation
	 *            the expectedBizLocation to set
	 */
	public void setExpectedBizLocation(String expectedBizLocation) {
		this.expectedBizLocation = expectedBizLocation;
	}

	/**
	 * @return the expectedBizLocationType
	 */
	public BizLocationType getExpectedBizLocationType() {
		return expectedBizLocationType;
	}

	/**
	 * @param expectedBizLocationType
	 *            the expectedBizLocationType to set
	 */
	public void setExpectedBizLocationType(
			BizLocationType expectedBizLocationType) {
		this.expectedBizLocationType = expectedBizLocationType;
	}

	@Override
	public String toString() {
		return "[tagID = " + tagID + ", currentBizLocation = "
				+ currentBizLocation + ", currentBizLocationType = "
				+ currentBizLocationType + ", expectedBizLocation = "
				+ expectedBizLocation + ", expectedBizLocationType = "
				+ expectedBizLocationType + "]";
	}
}
